// ImmKpSerialTracker.h: interface for the ImmKpSerialTracker class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IMMKPSERIALTRACKER_H__C6BDDA01_AEA7_11D5_AC47_0080C84E291C__INCLUDED_)
#define AFX_IMMKPSERIALTRACKER_H__C6BDDA01_AEA7_11D5_AC47_0080C84E291C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <windows.h>
#include <process.h>
#include <stdio.h>
#include <time.h>

class ImmKpSerialTracker  
{
public:
	int com;
	BOOL bTrackerPresent;
	int Create();
	ImmKpSerialTracker();
	virtual ~ImmKpSerialTracker();
	void SERIAL_read3DOF( float *azAngle, float *elAngle, float *twAngle );

protected:
	HANDLE hPort;
	DCB CommParam;
	void SERIAL_flushReadBuffer( void );
	void SERIAL_out( unsigned char ch );
	BOOL SERIAL_readShort( short *num );
	BOOL SERIAL_in( unsigned char *ch );
	void SERIAL_restore( void );
	BOOL SERIAL_initPort( char *cPort );
	BOOL SERIAL_openTracker( char *cPort );
};

#endif // !defined(AFX_IMMKPSERIALTRACKER_H__C6BDDA01_AEA7_11D5_AC47_0080C84E291C__INCLUDED_)
